/**
 * 
 */
package com.hanhai.zrb.model.common.enums;


public enum StatusEnums {
	DRAF(201,"草稿"),
	SUBMIT(202,"已提交"),
	RELEASE(203,"已发布"),
	WITHDRAW(204,"已撤回"),
	DEALPROJECT(205,"已成交"),
	//DEL(206,"已删除"),
	;
	
	private Integer code;
	
	private String value;
	
	public Integer getCode() {
		return code;
	}

	public String getValue() {
		return value;
	}

	private StatusEnums(int code,String value){
		this.code = code;
		this.value = value;
	}
	
	public static String  getValueByCode(int code){
		for(StatusEnums status:StatusEnums.values()){
			if(status.getCode() == code){
				return status.getValue();
			}
		}
		return null;
	}
	
	public static StatusEnums getByCode(int code){
		for(StatusEnums status:StatusEnums.values()){
			if(status.getCode() == code){
				return status;
			}
		}
		return null;
	}
	
//	public static void main(String[] args) {
//
//		for(StatusEnums status :StatusEnums.values()){
//			System.out.println("code="+status.getCode()+ " values = "+status.getValue());
//		}
//	}
}
